home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 13-05.C < prev    next >
Text File  |  1992-01-31  |  716b  |  34 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int voice_array[61];
  10.    int i;
  11.    int volume;
  12.  
  13.    if (fg_testmode(9,0) == 0) {
  14.       printf("This program requires a PCjr or ");
  15.       printf("a Tandy 1000 system.\n");
  16.       exit(1);
  17.       }
  18.  
  19.    i = 0;
  20.  
  21.    for (volume = 1; volume <= 15; volume++) {
  22.       voice_array[i++] = 1;      /* use channel 1 */
  23.       voice_array[i++] = 500;    /* 500 Hz frequency */
  24.       voice_array[i++] = volume; /* variable volume */
  25.       voice_array[i++] = 16;     /* duration */
  26.       }
  27.    voice_array[i] = 0;
  28.  
  29.    fg_voices(voice_array,1);
  30.  
  31.    while(fg_playing())
  32.       printf("Still playing...\n");
  33. }
  34.